﻿#region Using directives

using System;
using System.Runtime.Serialization;
using MCMLXVII.BackEnd.Services.Common.Messages;

#endregion

namespace MCMLXVII.BackEnd.Services.OrganizationChart.Messages
{
    [Serializable()]
    [System.Xml.Serialization.XmlType(Namespace = "http://tempuri.org/")]
    public class OrganizationTreeNodePermissions
    {
        private int _MemberID;
        public int MemberID
        {
            get
            {
                return _MemberID;
            }

            set
            {
                _MemberID = value;
            }
        }

        private string _MemberDescription;
        public string MemberDescription
        {
            get
            {
                return _MemberDescription;
            }

            set
            {
                _MemberDescription = value;
            }
        }

        private int _MemberClass;
        public int MemberClass
        {
            get
            {
                return _MemberClass;
            }

            set
            {
                _MemberClass = value;
            }
        }

        private string _Permission;
        public string Permission
        {
            get
            {
                return _Permission;
            }

            set
            {
                _Permission = value;
            }
        }


        public OrganizationTreeNodePermissions()
        {

        }

        public OrganizationTreeNodePermissions(int memberID, string memberDescription, int memberClass, string Permission)
        {
            _MemberClass = memberClass;
            _MemberDescription = memberDescription;
            _MemberID = memberID;
            _Permission = Permission;
        }

    }

    [Serializable()]
    [System.Xml.Serialization.XmlType(Namespace = "http://tempuri.org/")]
    public class msgOrganizationTreeNodeSecurity
    {

        private OrganizationTreeNodePermissions[] _Inherited;
        public OrganizationTreeNodePermissions[] Inherited
        {
            get
            {
                return _Inherited;
            }

            set
            {
                _Inherited = value;
            }
        }

        private OrganizationTreeNodePermissions[] _Defined;
        public OrganizationTreeNodePermissions[] Defined
        {
            get
            {
                return _Defined;
            }

            set
            {
                _Defined = value;
            }
        }


        public msgOrganizationTreeNodeSecurity()
        {
    
        }

        public msgOrganizationTreeNodeSecurity(OrganizationTreeNodePermissions[] inherited, OrganizationTreeNodePermissions[] defined)
        {
            _Inherited = inherited;
            _Defined = defined;
        }
    }

    [Serializable()]
    [System.Xml.Serialization.XmlType(Namespace = "http://tempuri.org/")]
    public class msgUpdateOrganizationTreeNodeSecurity: IOrganizationTreeNodeOperation 
    {
        private int _Nodeid;
        private int _UpdateSequence;
        private bool _BlockInheritance;
        private OrganizationTreeNodePermissions[] _Defined;
        public OrganizationTreeNodePermissions[] Defined
        {
            get
            {
                return _Defined;
            }

            set
            {
                _Defined = value;
            }
        }
        public int UpdateSequence
        {
            get
            {
                return _UpdateSequence;
            }

            set
            {
                _UpdateSequence = value;
            }
        }
        public bool BlockInheritance
        {
            get
            {
                return _BlockInheritance;
            }

            set
            {
                _BlockInheritance = value;
            }
        }

        public msgUpdateOrganizationTreeNodeSecurity()
        {

        }

        public msgUpdateOrganizationTreeNodeSecurity(int nodeID, int updateSequence, bool blockInheritance, OrganizationTreeNodePermissions[] defined)
        {
            _Defined = defined;
            _Nodeid = nodeID;
            _UpdateSequence = updateSequence;
            _BlockInheritance = blockInheritance;

        }

        #region IOrganizationTreeNodeOperation Members
        public int NodeID
        {
            get { return _Nodeid; }
            set { _Nodeid = value; }
        }


        #endregion
    }

}
